home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / STOpen.z / STOpen
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSTTTTOOOOppppeeeennnn((((3333))))                        IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                         SSSSTTTTOOOOppppeeeennnn((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      STOpen, STClose - open/close a STIFF file stream
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttiiiiffffffff....hhhh>>>>
  14.  
  15.      SSSSTTTTSSSSttttrrrreeeeaaaammmm**** SSSSTTTTOOOOppppeeeennnn((((iiiinnnntttt ffffdddd,,,, iiiinnnntttt ffffllllaaaaggggssss))));;;;
  16.  
  17.      iiiinnnntttt SSSSTTTTCCCClllloooosssseeee((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt))));;;;
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      _S_T_O_p_e_n opens a STIFF stream for the specified file descriptor. The
  21.      SSSSTTTTSSSSttttrrrreeeeaaaammmm pointer returned by _S_T_O_p_e_n is a handle used by many _l_i_b_s_t_i_f_f
  22.      functions. _f_d is a file descriptor obtained from a system call such as
  23.      _o_p_e_n(_2), _p_i_p_e(2), or _s_o_c_k_e_t(2), or from a call to _f_i_l_e_n_o(_3_S).  The _f_l_a_g_s
  24.      parameter specifies how the STIFF stream should be opened.  Specifying
  25.      _f_l_a_g_s as SSSSTTTT____RRRREEEEAAAADDDD opens the stream for reading.  Specifying SSSSTTTT____WWWWRRRRIIIITTTTEEEE opens
  26.      the stream for writing. The value specified for _f_l_a_g_s should agree with
  27.      the file descriptor's open mode.  That is, if _f_d is a read-only
  28.      descriptor, _f_l_a_g_s should be SSSSTTTT____RRRREEEEAAAADDDD.  _l_i_b_s_t_i_f_f does not support reading
  29.      and writing on the same stream.
  30.  
  31.      _S_T_C_l_o_s_e writes a terminating empty IFD (if _s_t was open for writing) and
  32.      closes the STIFF stream previously opened by a call to _S_T_O_p_e_n.
  33.  
  34. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  35.      _S_T_O_p_e_n returns a pointer to a newly opened STIFF stream if execution was
  36.      successful. NULL is returned and _S_T_e_r_r_n_o is set if an execution error has
  37.      occurred.
  38.  
  39.      _S_T_C_l_o_s_e returns 0 if execution was successful. -1 is returned and _S_T_e_r_r_n_o
  40.      is set if an execution error has occurred.
  41.  
  42. WWWWAAAARRRRNNNNIIIINNNNGGGG
  43.      STIFF stream information is maintained with the _S_T_S_t_r_e_a_m structure by the
  44.      _l_i_b_s_t_i_f_f functions. For this reason all reading and writing to a STIFF
  45.      stream should be done using only _l_i_b_s_t_i_f_f functions. Use of other
  46.      functions (e.g. _w_r_i_t_e(_2)) to perform STIFF stream I/O will lead to
  47.      unexpected results and is strongly discouraged.
  48.  
  49. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  50.      _S_T_O_p_e_n will fail under the following circumstances.
  51.  
  52.      STEBADSTREAM             Invalid STIFF stream.
  53.  
  54.      STEWRITETOREAD           Attempt to write to a read only stream.
  55.  
  56.      STEREADFROMWRITE         Attempt to read from a write stream.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSTTTTOOOOppppeeeennnn((((3333))))                        IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                         SSSSTTTTOOOOppppeeeennnn((((3333))))
  71.  
  72.  
  73.  
  74.      STESYSCALL               System call failed.
  75.  
  76.      _S_T_C_l_o_s_e will fail under the following circumstances.
  77.  
  78.      STENEEDSEEK              Operation requires seeking on a stream.
  79.  
  80.      STESYSCALL               System call failed.
  81.  
  82. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  83.      libstiff(3).
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.